package com.hex.ds.hdtp.core.inf.data.table.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hex.ds.hdtp.core.inf.data.table.po.TableTransferTaskPo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Package com.hex.ds.hdtp.core.inf.data.table.mapper
 * @ClassName ITableTransferTaskMapper
 * @Description 表迁移-数据映射接口
 * @Author Wang zhihao
 * @Date 2023/8/8 19:36
 * @Version v1.0
 **/
@Repository
public interface ITableTransferTaskMapper extends BaseMapper<TableTransferTaskPo> {

    /**
     * @Method queryListByPage
     * @Param
     * @param toMyBatisPlusPage
     * @param tableTransferTaskPo
     * @Return com.baomidou.mybatisplus.core.metadata.IPage<com.hex.ds.hdtp.core.inf.data.table.po.TableTransferTaskPo>
     * @Description 分页查询
     * @Author Wang zhihao
     * @Date 2023/8/9 11:15
     * @Version V1.0
     */
    IPage<TableTransferTaskPo> queryListByPage(IPage<TableTransferTaskPo> toMyBatisPlusPage,
                                               @Param("po") TableTransferTaskPo tableTransferTaskPo);

    /**
     * @Method queryList
     * @Param
     * @param tableTransferTaskPo
     * @Return java.util.List<com.hex.ds.hdtp.core.inf.data.table.po.TableTransferTaskPo>
     * @Description 不分页查询
     * @Author Wang zhihao
     * @Date 2023/8/10 18:30
     * @Version V1.0
     */
    List<TableTransferTaskPo> queryList(@Param("po") TableTransferTaskPo tableTransferTaskPo);

    /**
     * @Method queryInfoById
     * @Param
     * @param pkId
     * @Return com.hex.ds.hdtp.core.inf.data.table.po.TableTransferTaskPo
     * @Description 根据主键查询信息
     * @Author Wang zhihao
     * @Date 2023/8/16 11:40
     * @Version V1.0
     */
    TableTransferTaskPo queryInfoById(String pkId);

    /**
     * @Method modifySuccessRunLog
     * @Param
     * @param pkId
     * @Return void
     * @Description 更新表迁移成功数量
     * @Author Wang zhihao
     * @Date 2023/8/16 11:41
     * @Version V1.0
     */
    void modifySuccessNum(String pkId);

    /**
     * @Method modifyFailRunLog
     * @Param
     * @param pkId
     * @Return void
     * @Description 更新表迁移失败数量
     * @Author Wang zhihao
     * @Date 2023/8/16 11:42
     * @Version V1.0
     */
    void modifyFailNum(String pkId);

    /**
     * @Method modifyStatus
     * @Param
     * @Param endTime
     * @Param pkId
     * @Return void
     * @Description 更新表迁移任务状态
     * @Author gj.xu
     * @Date 2023/9/26 15:38
     * @Version V2.0
     */
    void modifyTransferStatus(String endTime, String pkId);

    /**
     * @Method increaseTotalNum
     * @Param
     * @param pkId
     * @Return void
     * @Description 增加清单总数
     * @Author Wang zhihao
     * @Date 2023/8/25 10:24
     * @Version V1.0
     */
    void increaseTotalNum(String pkId);

    /**
     * @Method decreaseTotalNum
     * @Param
     * @param pkId
     * @Return void
     * @Description 减少清单总数
     * @Author Wang zhihao
     * @Date 2023/8/25 10:24
     * @Version V1.0
     */
    void decreaseTotalNum(String pkId);
}
